<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ajax-baidu</title>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue-resource/1.5.1/vue-resource.js"></script>
</head>
<body>
<div id="case9-demo4">
    <button type="button" v-on:click="baiduS">发送jsonp请求</button>
</div>
</body>
<!--
https://www.baidu.com/sugrec?pre=1&p=3&ie=utf-8&json=1&prod=pc&from=pc_web&wd=df&req=2&bs=sad&csor=2&cb=jQuery110205022742868254939_1591276939146&_=1591276939149
-->
<script type="text/javascript">
    var case9Demo4=new Vue({
        el:"#case9-demo4",
        methods:{
            baiduS:function () {
                this.$http.jsonp("https://www.baidu.com/sugrec",{
                    params:{
                        wd:"d",
                        prod:'pc'
                    }
                })
                .then((res)=>{
                    console.log(res.data)
                })
            }
        }
    })
</script>
</html>